﻿
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
namespace WzhModule.GM
{
    public class WzhGMStart : MonoBehaviour
    {
        public Transform uicanvas;
        public Camera UICamera;
        void Start()
        {
            //var uicanvas = GameObject.Find("UICanvas").transform;
            //var UICamera = GameFrameEntry.GetModule<UIModule>().UICamera;
            List<Assembly> assemblyList = new List<Assembly>();
            assemblyList.Add(LoadAssembly("Assembly-CSharp"));
            WzhGMControl.Init(uicanvas, UICamera, assemblyList);
        }

        private Assembly LoadAssembly(string AssemblyName)
        {
            Assembly assembly = Assembly.Load(AssemblyName);
            return assembly;
        }
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.G))
            {
                WzhGMControl.Show();
            }
        }
    }
}